using System;
namespace ERIMobileL.oo
{
    public class Person 
    {
        private string rut;
        private string telefono;

        public Person(string rut, string telefono)
        {
            this.Rut = rut;
            this.Telefono = telefono;
        }
        public Person(string rut)
        {
            this.Rut = rut;
            this.Telefono = "0";
        }

        public string Rut
        {
            get { return rut; }
            set { rut = value; }
        }

        public string Telefono
        {
            get { return telefono; }
            set { telefono = value; }
        }

        public string ppRut()
        {
            return rut.Substring(0, rut.Length - 1)
                  + "-"
                  + rut.Substring(rut.Length - 1);
        }

        /*
        public string asParameterLine(Command protocolCommand)
        {
            if (protocolCommand.asLine() == LoginCommand.LOGIN)
                return this.rut;
            
            throw new Exception("Incorrect command call ["
                +protocolCommand.asLine()+"]in Persona");
        }

        public IParameter fromParameterLine(string[] parameters)
        {
            throw new NotImplementedException();
        }*/
    }
}